home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
051-075
/
disk_056
/
mcad
/
tdp
/
source
/
ffp.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
590b
|
31 lines
/* ffp.h */
#define FFP_H 1
#include <float.h>
#include <math.h>
typedef float FFP;
#define FASTFLOAT
#ifndef FASTFLOAT
extern double atof(char *);
#define atoFFP(x) atof(x)
#else
extern FFP atoFFP(char *);
#endif
extern FFP FFPLARGE, FFPSMALL;
#ifndef max
#define max(a,b) (((a)>(b)) ? (a) : (b))
#define min(a,b) (((a)>(b)) ? (b) : (a))
#endif
#define NINT(a) ((int)((a)>=0 ? (a)+0.5 : (a)-0.5))
/* a AND b DIFFER BY LESS THAN DEFAULT TOLERANCE ? */
#define FFPSAME(a,b) (abs((a)-(b)) <= FFPSMALL)
/* a AND b DIFFER BY LESS THAN c */
#define FFPNEAR(a,b,c) (abs((a)-(b)) <= (c))